import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;


public class RenduJRTable 
       extends DefaultTableCellRenderer {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Component getTableCellRendererComponent(JTable table, Object valeur,
			                                       boolean isSelected, boolean hasFocus, 
			                                       	int row, int column)
	{
		super.getTableCellRendererComponent(table, valeur, isSelected, hasFocus, row, column);
		
		CelluleTable cel = (CelluleTable)valeur;
		
		switch (cel.getType())
		{
			case CelluleTable._MESURE :
				this.setIcon(new ImageIcon("./pictures/meas.png"));
				break;
			default :
				setBackground(Color.WHITE);
				break;
		}
		return this;
	}
}